Florian Müllner [Thu, 4 Oct 2018 14:52:34 +0000 (16:52 +0200)]
panel: Ignore shell-shows-app-menu setting
The GtkSettings was originally introduced to inform applications about
the desktop shell's capabilities, but users soon started to use it to
force GTK+ to show the app menu inside the application. We eventually
caved and also handled the setting ourselves to hide the in-shell app
menu to allow users to "move" it.
But now the remote app menu is in the process of being retired[0], and
will be replaced with a simple indicator that cannot be moved, so
stop following the GtkSetting.
Ray Strode [Wed, 23 Jan 2019 20:59:42 +0000 (15:59 -0500)]
shellActionModes: disable POPUP keybindings in unlock screen
Certain keybindings should continue to work even when a popup
menu is on screen. For instance, the keybinding for showing
the app menu and the keyinding for showing the calendar are
examples.
This is achieved by putting in place a special "POPUP" action
mode, whenever a popup menu is active. This mode replaces
the (e.g., "NORMAL" or "OVERVIEW") action mode that was in place
for as long as the popup menu is active.
But those keybindings should not work when the user is at the
unlock dialog (which uses an action mode of "UNLOCK").
Florian Müllner [Wed, 23 Jan 2019 22:55:12 +0000 (23:55 +0100)]
panel: Don't allow opening hidden menus via keybindings
We shouldn't allow toggling menus that aren't supported by the
current session mode, but as indicators are hidden rather than
destroyed on mode switches, it is not enough to check for an
indicator's existence.
Carlos Garnacho [Fri, 22 Dec 2017 15:02:51 +0000 (16:02 +0100)]
keyboard: Add Emoji keyboard
This keyboard works similar to GTK+'s emoji chooser (actually, both pull
from the same JSON file). Emojis are categorized in sections and variants
and kept in a "model".
The EmojiPager actor then uses this model to generate pages on-the-fly as
the user swipes around. This is an important optimization since the amount
of actors would rival with the rest of the shell otherwise.
The EmojiSelection object puts the EmojiPager, the page indicators and
a KeyContainer with the bottom row of emoji section shortcuts together to
implement the emoji panel as a whole.
The Keyboard object hooked this to an "emoji" key, which is just visible
on the Clutter.InputContentPurpose where showing an emoji would be
meaningful. Otherwise the surrounding buttons are made a bit wider to
cover up for it (i.e. as it was before).
Carlos Garnacho [Tue, 22 Jan 2019 11:10:51 +0000 (12:10 +0100)]
appDisplay: Separate PageIndicators to a separate file
In order to cater for emoji panel usage, we want something like PageIndicators
except:
- It should have horizontal disposition
- It should not be animatable (?)
- It should not be reactive
Separated PageIndicators into a base, non-animated widget, and an
AnimatedPageIndicators that can be used on appDisplay.js. Reactiveness is
set through an extra method, and layout is set as a construct argument.
Carlos Garnacho [Mon, 21 Jan 2019 20:39:27 +0000 (21:39 +0100)]
keyboard: Separate aspect ratio control to a container actor
This will be useful as we want other panels (eg. emoji) to preserve aspect
ratio with the rest of the OSK. Separate the aspect ratio management logic
into this container that will be the parent of them all.
Carlos Garnacho [Mon, 21 Jan 2019 20:34:27 +0000 (21:34 +0100)]
theme: Reduce minimum OSK key width/height
The OSK panel uses 1/3rd of the monitor height, plus we specify a minimum
size for the keys. This doesn't play along if contents won't fit (short
monitor, big fonts, ...) pushing contents offscreen. Reduce the minimum
size a bit so there's better chances to fit.
Florian Müllner [Wed, 30 Jan 2019 16:48:28 +0000 (17:48 +0100)]
panel: Remove panel translucency
Since commit 447bf55e45b we turn the top bar translucent when
free-floating. While this looks fancy and reduces the appearance
of cutting into the available screen space, it has also had a
negative effect on legibility.
Nobody stepped up to address those issues in two years, so revert
back to the fully opaque top bar.
Having Unity-like shortcuts for activating the first nine applications
in the dash has been a long requested feature, but somehow nobody got
around to implement it.
As the shortcut is most useful outside the overview where the dash is
not visible, only consider favorite apps as they have a predictable
order.
Florian Müllner [Fri, 1 Feb 2019 19:11:39 +0000 (20:11 +0100)]
extensionPrefs: Work around xgettext bug
xgettext is thrown off by the combination of backticks and slashes,
which makes template string a fun trap to fall into. Just use
String.format() for now ...
verdre [Wed, 30 Jan 2019 19:54:44 +0000 (20:54 +0100)]
workspace: Rename some variables for clarity
Since the overlays we show on hover above the window clones are no
longer only a close button, but the window title, a border and a close
button, rename a few variables so it's easier to understand what they're
for.
As of https://gitlab.gnome.org/GNOME/gnome-weather/commit/9f7f5a68d47c5aaa0d18453f51c92a629c88ed78 Weather uses
org.gnome.Weather everywhere instead of org.gnome.Weather.Application.
Florian Müllner [Wed, 30 Jan 2019 22:00:35 +0000 (23:00 +0100)]
a11y: Don't set WM theme
We've been using GTK to draw server-side decorations according to the
GTK theme for a long time, so no need to configure the HighContrast
theme for a setting we don't use.
Florian Müllner [Mon, 6 Aug 2018 02:15:12 +0000 (04:15 +0200)]
extensionPrefs: Improve error UI
Currently when a preference widget fails to load, we throw a raw
backtrace at the user. While that is undoubtedly useful information
for extension developers and bug reports, it is gibberish to most
users and hardly the first thing they should be exposed to.
Florian Müllner [Mon, 6 Aug 2018 00:31:18 +0000 (02:31 +0200)]
extensionPrefs: Add blank state
We currently show a big white window in case no extensions are
installed, which clearly isn't helpful. Add a small blank state
that explains what's going on.
Carlos Garnacho [Tue, 27 Nov 2018 12:36:26 +0000 (13:36 +0100)]
overview: Do not warp pointer to fake crossing event
This is actually papering over bugs in toolkits. On X11 the Xserver will
send crossing events when the stage input shape changes. As those go
end up ignored in GTK+, this warp call aims (and randomly manages) to send
a motion event that wouldn't go unlistened by the drag source window (the
one holding the grab).
This bug actually manifests in other ways, eg. by changing the window
beneath the pointer with alt-tab while DnDing. This should be fixed
altogether in the client side.
Carlos Garnacho [Tue, 27 Nov 2018 12:35:46 +0000 (13:35 +0100)]
modalDialog: Do not sync display here
This gdk_display_sync() call was added in commit a40daa3c22 so the alt-f2
dialog is able to spawn commands that trigger grabs on startup (eg. xmag/
xkill).
This seems worthwhile to do only on the X11 backend, and handling it in
mutter backend code seems cleaner.
Our helper method to translate a string according to the LC_TIME
setting uses the no-thread-safe setlocale(). While that's not an
issue in practice given that all JS code shares a single thread,
I was pointed to a better alternative when adopting the same
handling in gnome-desktop's wallclock[0].
Philip Withnall [Thu, 1 Nov 2018 20:56:25 +0000 (20:56 +0000)]
screenShield: Show detailed notification data if notifications hint it
Allow notifications to set a x-gnome-privacy-scope hint, with values in
['system', 'user']. If all the notifications in a particular source hint
that their privacy scope is ‘system’, don’t hide the notification
details on the lock screen.
This is aimed at fixing the particular case of power notifications: they
contain information which is not private to the user (it relates to the
system: battery state or AC state, which is obvious to anyone who can
see the machine), so hiding the details of a power management
notification when the screen is locked is pointless.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/issues/726
Florian Müllner [Tue, 29 Jan 2019 21:56:03 +0000 (22:56 +0100)]
ibusCandidatePopup: Clarify assignment in condition
Most often it is a bug if the condition part of a for-loop contains the
assignment operator rather than the comparison one, so tools rightfully
emit a warning.
Clarify that the assignment is intentional in this case by adding
parentheses.
Florian Müllner [Tue, 29 Jan 2019 21:43:41 +0000 (22:43 +0100)]
iconGrid: Fix nonsense condition
Just like the "in" operator in the previous patch, "instanceof" has
a lower precedence than negation, resulting in the nonsense condition
of "true instanceof BaseIcon".
verdre [Fri, 11 Jan 2019 22:50:09 +0000 (23:50 +0100)]
workspaceThumbnail: Clean up porthole/workarea setting and updating
Instead of unnecessarily updating the porthole on every call to the
layout vfuncs and returning widths and heights of 0 when the overview is
hidden, only update it on actual workarea changes.
Also use the stage size for the porthole in case no monitor is available
to make sure we don't try to allocate a 0-sized box.
st: Check for ClutterImage when creating shadow pipelines
_st_create_shadow_pipeline_from_actor creates shadow pipelines
from actors. This function special-cases ClutterTexture as a
small performance improvement, since we can have access to the
CoglTexture easily with it. However, recent commits removed all
usage of ClutterTexture from GNOME Shell, rendering this optimization
useless. Instead, actors now may have a ClutterImage set as
their content, that can be used instead.
Replace the check for ClutterTexture with a check for ClutterImage,
and use the texture of the image when it is available.
magnifier: Use a ClutterContent to render mouse sprite
The Magnifier class uses a small subtree of actors to track the
current cursor's position and sprite. Specifically, it uses the
deprecated ClutterTexture to paint the cursor sprites.
Add a new, very simple ClutterContent implementation to track the
cursor sprite, and replace the ClutterTexture by a ClutterActor.
Florian Müllner [Tue, 29 Jan 2019 14:30:40 +0000 (15:30 +0100)]
messageTray: Disconnect signals when resetting notification
Just like we did for the parent class in commit b57832716a, we should
disconnect any notification signals when the notification is reset
to null to avoid warnings later.
Carlos Garnacho [Thu, 10 Jan 2019 22:19:17 +0000 (23:19 +0100)]
st: Use ClutterKeymap to detect caps lock state changes
This drops usage of Gtk/X11, replacing it with code that is dependent
of the Clutter backend in use. Another positive side effect is that
the keymap state will now be correct on wayland, since there were no
guarantees that X11 key state would reflect the current reality.
Florian Müllner [Mon, 28 Jan 2019 02:34:48 +0000 (03:34 +0100)]
ci: Add minimal continuous integration
Building gnome-shell is tricky due to the tight coupling with mutter,
but until we figure out the best way forward, we can at least perform
some basic syntax checking on the javascript bits.
Carlos Garnacho [Mon, 3 Dec 2018 12:09:47 +0000 (13:09 +0100)]
shell-global: Make saving of persistent state asynchronous
This is an expensive operation that is best avoided in the main loop. Given
the call doesn't care much about returning error or status, it can just
be made async within.
Every operation on a given file will be destructive wrt previous
operations on the same file, so we just cancel any pending operation on
it before batching the current one.
The last patch in the series, this one adapts StShadowHelper
to received a CoglFramebuffer. This is where we first touch
JavaScript with Cogl types, and as such, it depends on the
latest Mutter. Earlier versions of Mutter didn't have its
Mutter-Clutter GIR to generate types for various Cogl types.
Same case of the previous patch; _st_paint_shadow_with_opacity()
uses cogl_get_draw_framebuffer(), and this patch makes it receive
a CoglFramebuffer as a parameter instead.
The cautious reader might notice that this commit apparently goes
against the long-term goal, for it introduces more instances of
cogl_get_draw_framebuffer(). This is not wrong, but these introduced
ones will be removed later on, when ClutterActor.paint() receives
a CoglFramebuffer as a parameter instead.
This is in preparation for a future where only explicit frambuffer
APIs are available, i.e., cogl_get_draw_framebuffer() does not
exist.
There is absolutely no functional changes in this patch (nor the
following ones in this series), only rearrangements so that various
functions receive a CoglFramebuffer instead of using the draw
framebuffer.